const path = require('path');

module.exports = {
    entry: "./main.js",
    output: {
        path: path.join(__dirname, 'dist'),
        publicPath: '/dist/',
        filename: 'main.js',
      },
    module: {
        rules: [
          {
            test: /\.js$/,
            exclude: /(node_modules|bower_components)/,
            use: {
              loader: 'babel-loader',
              options: {
                  presets: ['@babel/preset-env'],
                  plugins: [['@babel/plugin-transform-react-jsx', {pragma:"createElement"}]]
              }
            }
          }
        ]
    },
    mode: "development",
    devServer: {
        static: './',
      },
}